package com.ienai.ddns;

import com.ienai.ddns.service.DdnsService;
import com.ienai.ddns.util.MyUtils;

/**
 * 运行时入口
 *
 * @author ienai
 */
public class AppRun {
    private static DdnsService ddnsService = new DdnsService();
    private static Thread serviceThread = null;

    public static void main(String[] args) {
        while (true) {
            if (serviceThread == null || !serviceThread.isAlive()) {
                serviceThread = new Thread() {
                    @Override
                    public void run() {
                        super.run();
                        ddnsService.Start();
                    }
                };
                serviceThread.start();
            }
            MyUtils.sleep(60000);
        }
    }

}
